package wechat.bean.response.message.reply;

import org.dom4j.DocumentException;
import org.dom4j.Element;

import wechat.bean.response.MessageBaseBean;

/**
 * 音乐消息
 * 
 *
 */
public class ReplyMusicBean extends MessageBaseBean {

	private String Title;
	private String Description;
	private String MusicUrl;
	private String HQMusicUrl;
	private String ThumbMediaId;
	
	public ReplyMusicBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Reply_Message_Music);
	}
	
	public ReplyMusicBean(){
		super.setMsgType(Reply_Message_Music);
	}

	public String getTitle() {
		return Title;
	}

	public void setTitle(String title) {
		Title = title;
	}

	public String getDescription() {
		return Description;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public String getMusicUrl() {
		return MusicUrl;
	}

	public void setMusicUrl(String musicUrl) {
		MusicUrl = musicUrl;
	}

	public String getHQMusicUrl() {
		return HQMusicUrl;
	}

	public void setHQMusicUrl(String hQMusicUrl) {
		HQMusicUrl = hQMusicUrl;
	}

	public String getThumbMediaId() {
		return ThumbMediaId;
	}

	public void setThumbMediaId(String thumbMediaId) {
		ThumbMediaId = thumbMediaId;
	}

	
//	protected static final String Xpath_PicUrl = "/xml/PicUrl";
//	protected static final String Xpath_MediaId = "/xml/MediaId";
//	
//	public void transform() throws Exception {
//		super.transform();
//		this.setPicUrl(getNodeText(Xpath_PicUrl));
//		this.setMediaId(getNodeText(Xpath_MediaId));
//	}
	
	
	public String buildXml() throws Exception {
		super.buildXml();
		Element Music = super.addNode("Music");
		Music.addElement("Title").addCDATA(getTitle());
		Music.addElement("Description").addCDATA(getDescription());
		Music.addElement("MusicUrl").addCDATA(getMusicUrl());
		Music.addElement("HQMusicUrl").addCDATA(getHQMusicUrl());
		Music.addElement("ThumbMediaId").addCDATA(getThumbMediaId());
		return parent.asXML();
	}

	




}
